﻿@model System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.Principal>
@{
    ViewBag.Title = "User Groups";
}
<fieldset>
    <legend>Groups this User Belongs To</legend>
    <br />
    Total Groups: @Model.Count()
    <table>
        <thead>
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Description
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var g in Model.OrderBy(g => g.Name))
            {
                <tr>
                    <th>
                        @g.Name
                    </th>
                    <td>
                        @g.Description
                    </td>
                </tr>
            }
        </tbody>
    </table>
</fieldset>
